﻿using TA.Turbo.Controls;
using System.Collections.Generic;
using System.Web.UI;

namespace TA.Turbo
{
	/// <summary>
	/// Describes a scenario which is output dynamically during an AJAX request.
	/// </summary>
	public class TemporaryPostScenario : PostScenario
	{
		#region PUBLIC
		#region INIT
		/// <summary>
		/// Ctor.
		/// </summary>
		public TemporaryPostScenario()
			: base()
		{
			TPage.Current.AddScenario(this);
		}
		/// <summary>
		/// Copy ctor.
		/// </summary>
		/// <param name="source"></param>
		public TemporaryPostScenario(PostScenario source)
			: base(source)
		{
			this._sourceUniqueId = source.UniqueID;
			TPage.Current.AddScenario(this);

			//this.Posting.Client = 


		}

		#endregion
		#region EVENTS
		#endregion
		#region PROPS
		/// <summary>
		/// Gets the page-wide unique identifier for this scenario.
		/// </summary>
		/// <remarks>
		/// This override takes care of the scenario where an existing scenario was used to create this scenario. In this case, the UniqueID for this scenario has to be equal to that of the source scenario for client-side matching.
		/// </remarks>
		public override string UniqueID
		{
			get
			{
				if (this._sourceUniqueId != null)
					return this._sourceUniqueId;
				return base.UniqueID;
			}
		}
		#endregion
		#region METHODS
		#endregion
		#endregion
		#region INTERNAL
		#region CONST/STATIC
		#endregion
		#region VARS
		string _sourceUniqueId;
		#endregion
		#region PROPS
		#endregion
		#region METHODS
		#region INIT
		#endregion
		#region DATA
		#endregion
		#region HANDLERS
		#endregion
		#endregion
		#endregion
	}
}
